package com.puzzlebazar.client.main;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.History;
import com.puzzlebazar.client.admin.SiteModel;
import com.puzzlebazar.client.main.control.MainController;
import com.puzzlebazar.client.main.view.MainView;
import com.puzzlebazar.client.user.UserModel;

public class Main implements EntryPoint {

	@Override
	public void onModuleLoad() {

		try {
			SiteModel  settingsModel = SiteModel.get();
			UserModel      userModel     = UserModel.get();
			MainView       view          = new MainView(settingsModel,userModel);
			new MainController(settingsModel,userModel,view);
		} catch (Exception exception) {
			exception.printStackTrace();
		}

		History.fireCurrentHistoryState();
		
	}

}
